﻿#pragma once

#include "command.h"

namespace CAGD
{

/**
 * 点线投影.
 */
class CmdPointCurve : public CmdSelector
{
  public:
    /**
     * @brief 投影操作.
     * @return
     * @see
     */
    CmdStatus Perform() override;

  protected:
    Handle(GeomCurve) m_curve;
    Handle(GeomPoint) m_point;
};

/**
 * 最近点投影.
 */
class CmdNearPointCurve : public CmdPointCurve
{
  public:
    CAGD_CREATE_COMMAND(CmdNearPointCurve)

    /**
     * @brief 投影操作.
     * @return
     * @see
     */
    CmdStatus Perform() override;
};

/**
 * 正交点投影.
 */
class CmdOrthoPointCurve : public CmdPointCurve
{
  public:
    CAGD_CREATE_COMMAND(CmdOrthoPointCurve)

    /**
     * @brief 投影操作.
     * @return
     * @see
     */
    CmdStatus Perform() override;
};

/**
 * 点面投影.
 */
class CmdPointSurface : public CmdSelector
{
  public:
    /**
     * @brief 投影操作.
     * @return
     * @see
     */
    CmdStatus Perform() override;

  protected:
    Handle(GeomSurface) m_surface;
    Handle(GeomPoint) m_point;
};

/**
 * 最近点投影.
 */
class CmdNearPointSurface : public CmdPointSurface
{
  public:
    CAGD_CREATE_COMMAND(CmdNearPointSurface)

    /**
     * @brief 投影操作.
     * @return
     * @see
     */
    CmdStatus Perform() override;
};

/**
 * 正交点投影.
 */
class CmdOrthoPointSurface : public CmdPointSurface
{
  public:
    CAGD_CREATE_COMMAND(CmdOrthoPointSurface)

    /**
     * @brief 投影操作.
     * @return
     * @see
     */
    CmdStatus Perform() override;
};

/**
 * 曲率圆点投影.
 */
class CmdTorusPointSurface : public CmdPointSurface
{
  public:
    CAGD_CREATE_COMMAND(CmdTorusPointSurface)

    /**
     * @brief 投影操作.
     * @return
     * @see
     */
    CmdStatus Perform() override;
};

/**
 * 线面投影.
 */
class CmdCurveSurface : public CmdSelector
{
  public:
    /**
     * @brief 投影操作.
     * @return
     * @see
     */
    CmdStatus Perform() override;

  protected:
    Handle(GeomSurface) m_surface;
    Handle(GeomCurve) m_curve;
};

/**
 * 步进曲线投影.
 */
class CmdMarchCurveSurface : public CmdCurveSurface
{
  public:
    CAGD_CREATE_COMMAND(CmdMarchCurveSurface)

    /**
     * @brief 投影操作.
     * @return
     * @see
     */
    CmdStatus Perform() override;
};

/**
 * ODE 曲线投影.
 */
class CmdODECurveSurface : public CmdCurveSurface
{
  public:
    CAGD_CREATE_COMMAND(CmdODECurveSurface)

    /**
     * @brief 投影操作.
     * @return
     * @see
     */
    CmdStatus Perform() override;
};

} // namespace CAGD
